home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / KEYBOARD.SWG / 0028_Disable PRINT SCREEN.pas < prev    next >
Pascal/Delphi Source File  |  1993-06-22  |  2KB  |  49 lines

  1. ===========================================================================
  2.  BBS: Canada Remote Systems
  3. Date: 06-15-93 (09:40)             Number: 26422
  4. From: CHRIS JANTZEN                Refer#: NONE
  5.   To: JANOS SZAMOSFALVI             Recvd: NO  
  6. Subj: Re: No print screen            Conf: (1221) F-PASCAL
  7. ---------------------------------------------------------------------------
  8. On Sunday June 13 1993, Janos Szamosfalvi wrote to All:
  9.  
  10.  JS> PROGRAM NoPrintScreen;
  11.  
  12.  JS> PROCEDURE Null; Interrupt;
  13.  JS> BEGIN
  14.  JS> END;
  15.  
  16.  JS> BEGIN
  17.  JS>   SetIntvec($05, @Null);
  18.  JS>   Keep(1);
  19.  JS> END.
  20.  
  21.  JS> I have several questions about this code:
  22.  JS>   a) when it comes to reloading COMMAND.COM, my computer hangs
  23.  JS>      with memory allocation error when the above program is in
  24.  JS>      memory.
  25.  JS>      Any idea why?
  26.  
  27. An easy one: You forgot to tell the compiler how much memory your program
  28. wants. Put the following directive at the beginning of your program:
  29.  
  30. {$M 1024,0,0}
  31. PROGRAM NoPrintScreen;
  32. [...]
  33.  
  34. That little "{$M" tells the compiler to tell DOS that you don't want a lot of
  35. RAM when loaded. Otherwise, your application will allocate (and Keep) all
  36. available RAM in the system (effectively making your program a 640K TSR!).
  37.  
  38.  JS>   b) can anyone tell me how to modify this so PrintScren
  39.  JS>      would be the second Esc key?
  40.  
  41. Ah, that would be a bit trickier.... You'd need to trap Int 9 using some
  42. assembly code (but my brain is mush right now, so I'll let someone else help
  43. you on that).
  44.  
  45. Chris KB7RNL =->
  46.  
  47. --- GoldED 2.41
  48.  * Origin: SlugPoint * Home to fine silly people everywhere (1:356/18.2)
  49.